/*
 * @Author: Dorange.Wang
 * @Date: 2021-04-22 19:55:03
 * @LastEditors: your name
 * @LastEditTime: 2021-04-22 19:56:02
 * @Description: file content
 */
import Vue from 'vue'
import template from './Cron'
class CreateInstance {
  constructor () {
    this.instance = null
  }
  static create () {
    if (!this.instance) {
      const BenConstructor = Vue.extend(template)
      this.instance = new BenConstructor({
        el: document.createElement('div')
      })
      document.body.appendChild(this.instance.$el)
    }
  }
  static open (...arg) {
    this.create()
    return this.instance.open(...arg)
  }
}
export default CreateInstance
